class Ball extends egret.Shape {
    public radius:number = 0
    public color:number = 0
    public vx:number = 0
    public vy:number = 0
    public dragging:boolean = false
    public static:boolean = false // 是否是静态球体
    public mass:number = 1
    public constructor(radius:number=40, color:number=0xFF0000) {
        super()
        this.radius = radius
        this.color = color
        this.init()
    }

    private init() {
        this.graphics.beginFill(this.color)
        this.graphics.lineStyle(2, 0xff0000 + Math.floor(Math.random() * 100) * (0xffffff / 100))
        this.graphics.drawCircle(0, 0, this.radius)
        this.graphics.endFill()
    }
}